<template>
  <div>
    <el-form ref="form" :model="form" label-width="80px" style="width: 500px;">
      <el-form-item label="账号">
        <el-input v-model="form.username"></el-input>
      </el-form-item>
      <el-form-item label="密码">
        <el-input v-model="form.password"></el-input>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="submit">注册</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
export default {
  data() {
    return {
      form: {
      },
    }
  },
  methods: {
    submit() {
      this.form.code = 12312 
      this.form.time = 23123
      console.log('点击注册', this.form)
      this.$emit('on-submit', this.form )
    },
  },
}
</script>

<style>
</style>
